#include "sort.hpp"
#include <cstdlib>
#include <iostream>

void test(void (*f)(int*, int)) {
  int len = 10;
  int *arr = (int *)std::malloc(sizeof(int) * len);
  for (size_t i = 0; i < len; i++) {
    int r = 100.0f * std::rand() / RAND_MAX;
    arr[i] = r * 1;
    std::cout << " " << arr[i];
  }
  std::cout << std::endl;
  f(arr, len);
  sort::test_print(arr, len);
}

int main(int argc, char const *argv[]) {
  using namespace sort;
  // test(quick_sort);
  // test(sort::insert_sort);
  test(sort::binary_sort);
  return 0;
}
